package com.kbook.bean;

import java.util.Map;

import com.kbook.action.Action;

public final class UserBean {

	private long id;
	
	private String nickName;
	
	private String name;
	
	private Action action;
	
	private int power;

	public UserBean(long id, String nickName, String name, int power) {
		super();
		this.id = id;
		this.nickName = nickName;
		this.name = name;
		this.power = power;
	}

	public Object excute(Map params) throws Exception{
		//如果未定义执行操作
		if(action == null){
			return null;
		}
		return action.excute(this, params);
	}
	
	public long getId() {
		return id;
	}

	public String getNickName() {
		return nickName;
	}

	public String getName() {
		return name;
	}

	public Action getAction() {
		return action;
	}

	public void setAction(Action action) {
		this.action = action;
	}

	public int getPower() {
		return power;
	}

	public void setPower(int power) {
		this.power = power;
	}
	
}
